<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/echarts.js"></script>
</head>
<body>
<div id="main" style="width: 400px;height: 400px;"></div>
<script type='text/javascript' src='../js/echarts-liquidfill.js'></script><script>var clock_in = 0;var total = 9;</script><script>//var clock_in = 3;
//var total = 40;
var rate = clock_in / total;
var data = [rate, rate*0.8, rate*0.75, rate*0.45];
var option = {
series: [{
    type: 'liquidFill',
    data: data,
    label:{
        formatter: function(param) {
            return '今日出勤率:\n' + clock_in + "/" + total + "\n" + (param.value).toFixed(3) * 100 + "%";
        }
    }
}]
};
var myChart = echarts.init(document.getElementById('main'));
myChart.setOption(option);</script></body></html>